package com.mixed.db.model;

import java.io.Serializable;

import com.mixed.db.MixedDbException;
import com.mixed.db.ModelDao;

@SuppressWarnings("serial")
public abstract class Entity<T> implements ModelDao<T>, Serializable{
	
	protected Long id;
	
	public boolean isStored(){
		return id != null;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public int delete() throws MixedDbException {
		return 0;
	}

	public T get() throws MixedDbException {
		return null;
	}

	public int insert() throws MixedDbException {
		return 0;
	}

	public T isExist() throws MixedDbException {
		return null;
	}

	public int modify() throws MixedDbException {
		return 0;
	}
	
}
